<?php
/*
+--------------------------------------------------------------------------
|   AffiliStore 2
|   ========================================
|   Web: http://www.affilistore.com
|   Email: admin (at) affilistore (dot) com
|	License Type: AffiliStore 2 is NOT open source software and limitations apply 
|   Licence Info: Visit AffiliStore website and click on 'Licence'
+--------------------------------------------------------------------------
*/
// checks to see if password session is set
// if not redirects to ../admin/
if($_SESSION['loggedIn'] == 0 && !isset($adminPage)){
include('../includes/auth.inc.php');
}

// all of your payment details
$getThePaymentDetails = mysql_query("SELECT a.*,b.accUsername FROM affiliSt_payments a JOIN affiliSt_accounts b ON a.accId = b.accId");
$thePaymentDetails = mysql_fetch_assoc($getThePaymentDetails);

/**
 * Get authentication object to get account id
 */
?>		
<fieldset>
<legend>Your Payment</legend>
<table cellpadding="6" cellspacing="0" border="0" width="100%">
<tr>
<th align="left" valign="top">Payment Id</th>
<th align="left" valign="top">Merchant</th>
<th align="left" valign="top">Amount</th>
<th align="left" valign="top">Date</th>
<th align="left" valign="top">Status</th>
</tr>
<?php
do {		
	echo('<tr><td style="border-top:1px solid #cccccc">'.$thePaymentDetails['pgmId'].'</td><td style="border-top:1px solid #cccccc">'.$thePaymentDetails['accUsername'].'</td><td style="border-top:1px solid #cccccc">$'.$thePaymentDetails['pgmGross'].'</td><td style="border-top:1px solid #cccccc">'.$thePaymentDetails['pgmDate'].'</td><td style="border-top:1px solid #cccccc">'.$thePaymentDetails['pgmStatus'].'</td></tr>');
} while ($thePaymentDetails = mysql_fetch_assoc($getThePaymentDetails));	
?>
</table>
</fieldset>